package com.designpatterns.proxypattern.jdkdynamicproxy;

public class TestJDKDynamicProxy {
    public static void main(String[] args) {
        //创建被代理对象
        HelloWorld helloWorld = new HelloWorldImpl();
        //创建调用处理器
        ProxyInvocationHandler handler = new ProxyInvocationHandler();
        //获取代理对象
        HelloWorld proxy = handler.getProxy(helloWorld);
        //调用代理对象的方法
        proxy.sayHello();
    }
}
